
package com.be.beadmin.design.repository;



import com.be.beadmin.design.entity.UnStandProductProcessInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
* @author cms
* @date 2023-09-13
**/
public interface UnStandProductProcessInfoRepository extends JpaRepository<UnStandProductProcessInfo, String>, JpaSpecificationExecutor<UnStandProductProcessInfo> {

    UnStandProductProcessInfo findUnStandProductProcessInfoByIdAndDelete(String id, Integer delete);

    UnStandProductProcessInfo findUnStandProductProcessInfoById(String id);

    List<UnStandProductProcessInfo> findUnStandProductProcessInfoByUnStandTypeIdAndDeleteOrderBySequence(String UnStandTypeId,Integer delete);

    UnStandProductProcessInfo findUnStandProductProcessInfoByUnStandTypeCodeAndAndProcessCode(String unStandType , String processCode);

    @Modifying
    @Transactional
    void deleteAllByUnStandTypeId(String UnStandTypeId);

}
